import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

import request from './API/request'
Vue.prototype.$http = request;

import mixin from '@/common/mixins';
Vue.mixin(mixin)
import init from '@/common/init'
import { Toast} from 'vant'

import '@/components/vant'

import '@/assets/iconfont/iconfont'

Vue.config.productionTip = false
// event Bus 用于无关系组件间的通信。
Vue.prototype.$bus = new Vue()


const app = new Vue({
  router,
  store,
  
  render: h => h(App)
})

init().then(res => {
  app.$mount("#app")
}).catch(err => {
  Toast("网络异常,请重试")
  app.$mount("#app")
})